{extend name="layouts@base" /}
{block name="head"}
<link rel="stylesheet" href="__STATIC__/mobile/default/css/picker.css"/>
<link rel="stylesheet" href="__STATIC__/mobile/default/css/userData.css" />
{/block}
{block name="body"}
personalData
{/block}
{block name="main" }
  <div class="page signInLog">
    <div class="page-hd">
      <div class="header bor-1px-b">
        <div class="header-left">
          <a href="javascript:history.go(-1)" class="left-arrow"></a>
        </div>
        <div class="header-title">
          签到记录
        </div>
        <div class="header-right">
          <a href=''></a>
        </div>
      </div>
    </div>
    <div class="top">
      <input type="text" class="fs28 fw_b color_3" readonly value="{$data[0]}" id="nowValue"/>
      <img src="__STATIC__/mobile/default/images/detail01.png" alt="">
    </div>
    <div class="page-bd">
      <!-- 页面内容-->
      <div class="list">
        {volist name="info" id="val" }
          {if condition ="$val.time >= $data[1]"}
          <div class="cell">
            <div class="left">
              <p class="fs28 fw_b color_2">
                今日
              </p>
            </div>
            <div class="right fs34 num color_r">
              <p class="fs34 num color_3">
                +{$val.use_integral}
              </p>
              <span class="fs24 color_9">星券</span>
            </div>
          </div>
          {else}
          <div class="cell">
            <div class="left">
              <p class="fs28 fw_b color_2">
                {$val.timeData}
              </p>
            </div>
            <div class="right fs34 num color_r">
              <p class="fs34 num color_3">
                +{$val.use_integral}
              </p>
              <span class="fs24 color_9">星券</span>
            </div>
          </div>
          {/if}
        {/volist}
      </div>
    </div>
  </div>
{/block}

{block name="footer"}
    <link rel="stylesheet" href="__STATIC__/mobile/default/css/layout.css"/>
    <script src="__STATIC__/mobile/default/js/page.js"></script>
    <link href="__STATIC__/mobile/default/css/picker.css" rel="stylesheet" />
    <link rel="stylesheet" href="__STATIC__/mobile/default/css/signIn.css" />
    <script src="__STATIC__/js/jquery/jquery/2.1.4/jquery.min.js"></script>
    <script src="__STATIC__/mobile/default/js/lib/fastclick.js"></script>
    <script src="__STATIC__/js/art-template.js"></script>
    <script>
        $(function() {
            FastClick.attach(document.body);
        });
    </script>
    <script src="__STATIC__/mobile/default/js/datePicker.js"></script>
    <script>
      $(function(){
        $('.dataBox img').on('click',function(){
          demoClick()
        })
      })

      // 日期选择器
      function demoClick() {
          var nowValue = document.getElementById('nowValue');
          var reg = new RegExp("年|月","g");
          var nowval=nowValue.value.replace(reg,"-").substring(0,7);
          new DatePicker({
              "type": "1",//0年, 1年月, 2月日, 3年月日
              "title": '请选择年月',//标题(可选)
              "maxYear": "2050",//最大年份（可选）
              "minYear": "1950",//最小年份（可选）
              "separator": "-",//分割符(可选)
              "defaultValue": nowval,//默认值（可选）
              "callBack": function (val) {
                  //回调函数（val为选中的日期）
                  var arr=val.split('-');
                  val=arr[0]+'年'+arr[1]+'月'
                  nowValue.value = val;
              }
          });
      }
    </script>
{/block}

